package com.inkFlow.crawl.domain.bo;

import com.inkFlow.common.core.validate.AddGroup;
import com.inkFlow.common.core.validate.EditGroup;
import com.inkFlow.crawl.domain.CrawlSourceConfig;
import com.inkFlow.common.mybatis.core.domain.BaseEntity;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;

/**
 * 爬虫管理业务对象 crawl_source_config
 *
 * @author inkFlow
 * @date 2025-08-21
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = CrawlSourceConfig.class, reverseConvertGenerate = false)
public class CrawlSourceConfigBo extends BaseEntity {

    /**
     * 爬虫id
     */
    private Integer crawlId;

    /**
     * 爬虫名称
     */
    @NotBlank(message = "爬虫名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String crawlName;

    /**
     * 爬虫地址
     */
    @NotBlank(message = "爬虫地址不能为空", groups = { AddGroup.class, EditGroup.class })
    private String crawlUrl;

    /**
     * 爬虫类型，1：文本；2：音频,；3：图片
     */
    @NotNull(message = "爬虫类型，1：文本；2：音频,；3：图片不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer crawlType;

    /**
     * 编码，默认utf-8
     */
    private String charset;

    /**
     * 是否启用，1：启用；2：禁用
     */
    @NotNull(message = "是否启用，1：启用；2：禁用不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer crawlEnabled;

    /**
     * 备注
     */
    @NotBlank(message = "备注不能为空", groups = { AddGroup.class, EditGroup.class })
    private String crawlRemark;


}
